#include "stl.h"
#include "parse.h"
#include "solution.h"
int main(int argc, char *argv[])
{
    string str = "[[\"[[\\\"o\\\",\\\"a\\\",\\\"a\\\",\\\"n\\\"],[\\\"e\\\",\\\"t\\\",\\\"a\\\",\\\"e\\\"],[\\\"i\\\",\\\"h\\\",\\\"k\\\",\\\"r\\\"],[\\\"i\\\",\\\"f\\\",\\\"l\\\",\\\"v\\\"]]\",\"[\\\"oath\\\",\\\"pea\\\",\\\"eat\\\",\\\"rain\\\"]\"],[\"[[\\\"a\\\",\\\"b\\\"],[\\\"c\\\",\\\"d\\\"]]\",\"[\\\"abcb\\\"]\"],[\"[[\\\"o\\\",\\\"a\\\",\\\"b\\\",\\\"n\\\"],[\\\"o\\\",\\\"t\\\",\\\"a\\\",\\\"e\\\"],[\\\"a\\\",\\\"h\\\",\\\"k\\\",\\\"r\\\"],[\\\"a\\\",\\\"f\\\",\\\"l\\\",\\\"v\\\"]]\",\"[\\\"oa\\\",\\\"oaa\\\"]\"]]";
    vector<vector<string>> arr = parseStringArrArr(str);
    for (int i = 0; i < arr.size(); i++)
    {
      vector<string> args = arr[i];
      Solution *s = new Solution();
      vector<vector<string>> arg0 = parseStringArrArr(args[0]);
      vector<vector<char>> data(arg0.size(), vector<char>(arg0[0].size()));
      vv_conv<string,char>(arg0, data, [](const string&s)->char{return s[0];});
      vector<string> arg1 = parseStringArr(args[1]);
      vector<string> result=s->findWords(data,arg1);
      string resultabc =serializeStringArr(result);
      cout << "resultabc"+to_string(i)+":" << resultabc <<"resultend"<< endl;
    }
    return 0;
}